<template>
    <div class="kefu">
        <header>
            <span @click="$back()"> <el-icon color="#fff" size="20">
                    <ArrowLeftBold />
                </el-icon></span>
            <strong>{{ $t("language.kefu.name") }}</strong>
            <span></span>
        </header>
        <main>
            <AppSkeleton :loading="loading">
                <template #ske>
                    <div style="width: 100%">
                        <el-skeleton-item variant="image" style="width: 100%; height: 150px; margin: 00px 0 10px 0" />

                        <div style="
                  width: 100%;
                  display: flex;
                  flex-direction: column;
                  padding: 20px;
                ">
                            <el-skeleton-item variant="text" style="
                    width: 100%;
                    height: 65px;
                    margin-bottom: 20px;
                    border-radius: 10px;
                  " /><el-skeleton-item variant="text" style="
                    width: 100%;
                    height: 65px;
                    margin-bottom: 20px;
                    border-radius: 10px;
                  " />
                            <el-skeleton-item variant="text" style="
                    width: 100%;
                    height: 65px;
                    margin-bottom: 20px;
                    border-radius: 10px;
                  " /><el-skeleton-item variant="text" style="
                    width: 100%;
                    height: 65px;
                    margin-bottom: 20px;
                    border-radius: 10px;
                  " />
                        </div>
                    </div>
                </template>
                <template #main>
                    <div class="bg"></div>
                    <dl>
                        <dd @click="jump('https://t.me/magicaplay_bot')">
                            <NuxtImg src="/img/kefu1.png" alt="" />
                            <el-button color="#0a906c">{{
                $t("language.kefu.icon1")
            }}</el-button>
                        </dd>
                        <dd @click="jump('https://t.me/magicaplay_bot')">
                            <NuxtImg src="/img/c27.jpg" alt="" />
                            <el-button color="#0a906c">{{ $t("language.kefu.icon2") }}</el-button>
                        </dd>
                        <dd @click="jump('https://m.facebook.com/')">
                            <NuxtImg src="/img/c28.png" alt="" /><el-button color="#0a906c">{{ $t("language.kefu.icon3")
                                }}</el-button>
                        </dd>
                        <dd>
                            <NuxtImg src="/img/c29.png" alt="" /><el-button color="#0a906c">{{ $t("language.kefu.icon4")
                                }}</el-button>
                        </dd>
                    </dl>
                </template>
            </AppSkeleton>
        </main>
    </div>
</template>
<script setup lang="ts">
import { ArrowLeftBold } from '@element-plus/icons-vue'
import { nextTick, ref,shallowRef, onMounted } from "vue";
let loading = shallowRef<boolean>(false);
onMounted(() => {
    nextTick(() => {
        // loading.value = false;
        let time = setInterval(() => {
            loading.value = false;
            clearInterval(time);
        }, 500);
    });
});
let jump = (url: string) => {
    window.open(url);
};
</script>
<style scoped lang="scss" name="kefu">
.kefu {
    width: 100%;

    header {
        width: 100%;
        height: 45px;
        position: fixed;
        left: 0;
        top: 0;
        @include flex(row, space-between, center);
        background-color: rgb(36, 39, 43);
        padding: 0 20px;
        color: #fff;

        span {
            display: block;
            height: 28px;
            width: 28px;
            line-height: 28px;
            @include flex(row, flex-start, center);
            cursor: pointer;

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

    main {
        padding: 45px 0 120px;
        width: 100vw;
        overflow-y: scroll;
        background-color: #161719;

        &::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }

        .bg {
            width: 100%;
            height: 150px;
            background: url("@/assets/img/bg.png") no-repeat;
            background-size: cover;
        }

        dl {
            padding: 20px;

            dd {
                height: 65px;
                padding: 10px 15px;
                @include flex(row, space-between, center);
                border-radius: 10px;
                margin-bottom: 20px;
                background: #23262b;

                img {
                    width: 45px;
                    border-radius: 22.5px;
                }

                .el-button {
                    font-size: 12px;
                    color: #fff;
                    width: 130px;
                    height: 32px;
                    line-height: 32px;
                    text-align: center;
                    background: #0a906c;
                    border-radius: 5px;
                    border: none;
                }
            }
        }
    }
}
</style>